<!DOCTYPE html>
<html lang="en" class="no-js">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
		<meta name="viewport" content="width=device-width, initial-scale=1"> 
		<title>Inspiration for Custom Select Elements | Demo 8</title>
		<meta name="description" content="Creative styles and ideas for custom select elements" />
		<meta name="keywords" content="custom select, select style, javascript, inspiration, select element" />
		<meta name="author" content="Codrops" />
		<link rel="shortcut icon" href="../favicon.ico">
		<link rel="stylesheet" type="text/css" href="css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="css/demo.css" />
		<link rel="stylesheet" type="text/css" href="css/cs-select.css" />
		<link rel="stylesheet" type="text/css" href="css/cs-skin-circular.css" />
		<!--[if IE]>
  		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
	</head>
	<body class="color-8">
		<div class="container">

			<header class="codrops-header">
				<h1><span>Inspiration for</span> Custom Select Elements</h1>	
				<nav class="codrops-demos">
					<a href="index.html">Border</a>
					<a href="index2.html">Underline</a>
					<a href="index3.html">Elastic</a>
					<a href="index4.html">Slide</a>
					<a href="index5.html">Overlay</a>
					<a href="index6.html">Rotate</a>
					<a href="index7.html">Box Select</a>
					<a class="current-demo" href="index8.html">Circular</a>
				</nav>
			</header>
			<section>
				<select class="cs-select cs-skin-circular">
					<option value="" disabled selected>Select an activity</option>
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
				</select>
			</section>
			
		</div><!-- /container -->
		<script src="js/classie.js"></script>
		<script src="js/selectFx.js"></script>
		<script>
			(function() {
				[].slice.call( document.querySelectorAll( 'select.cs-select' ) ).forEach( function(el) {	
					new SelectFx(el, {
						stickyPlaceholder: false,
						onChange: function(val){
							var img = document.createElement('img');
							img.src = 'img/'+val+'.png';
							img.onload = function() {
								document.querySelector('span.cs-placeholder').style.backgroundImage = 'url(img/'+val+'.png)';
							};
						}
					});
				} );
			})();
		</script>
	</body>
</html>